.class Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;
.super Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;
.source "ShowOnMapActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/htc/android/footprints/activity/ShowOnMapActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "DrawFootprintOverlay"
.end annotation


# instance fields
.field final synthetic this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;


# direct methods
.method private constructor <init>(Lcom/htc/android/footprints/activity/ShowOnMapActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 370
    iput-object p1, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    invoke-direct {p0}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/htc/android/footprints/activity/ShowOnMapActivity;Lcom/htc/android/footprints/activity/ShowOnMapActivity$1;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 370
    invoke-direct {p0, p1}, Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;-><init>(Lcom/htc/android/footprints/activity/ShowOnMapActivity;)V

    return-void
.end method


# virtual methods
.method protected createItem(I)Lcom/htc/android/footprints/vo/Footprint;
    .locals 1
    .parameter "i"

    .prologue
    .line 373
    iget-object v0, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    iget-object v0, v0, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->mDataList:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/htc/android/footprints/vo/Footprint;

    return-object p0
.end method

.method protected onTap([Lcom/htc/android/footprints/vo/Footprint;)Z
    .locals 6
    .parameter "footprints"

    .prologue
    const/4 v5, 0x1

    .line 387
    array-length v3, p1

    if-ne v3, v5, :cond_1

    .line 388
    new-instance v1, Landroid/content/Intent;

    const-string v3, "com.htc.android.footprints.activity.DetailViewActivity"

    invoke-direct {v1, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 390
    .local v1, intent:Landroid/content/Intent;
    const-string v3, "DATA"

    const/4 v4, 0x0

    aget-object v4, p1, v4

    invoke-virtual {v1, v3, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    .line 391
    const/high16 v3, 0x40

    invoke-virtual {v1, v3}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 392
    const/high16 v3, 0x400

    invoke-virtual {v1, v3}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 393
    const-string v3, "EXTRA_SORT_BY"

    const-string v4, "create_time desc"

    invoke-virtual {v1, v3, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 395
    const-string v3, "EXTRA_CATEGORY"

    invoke-static {}, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->access$400()Lcom/htc/android/footprints/vo/Category;

    move-result-object v4

    iget-object v4, v4, Lcom/htc/android/footprints/vo/Category;->mKeyword:Ljava/lang/String;

    invoke-virtual {v1, v3, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 397
    const-string v3, "EXTRA_ITEM_IDX"

    const/4 v4, -0x1

    invoke-virtual {v1, v3, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 398
    iget-object v3, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    invoke-virtual {v3, v1}, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->startActivity(Landroid/content/Intent;)V

    .line 443
    .end local v1           #intent:Landroid/content/Intent;
    :cond_0
    :goto_0
    return v5

    .line 399
    :cond_1
    array-length v3, p1

    if-le v3, v5, :cond_0

    .line 401
    invoke-static {}, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->access$500()I

    move-result v3

    iget-object v4, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    #getter for: Lcom/htc/android/footprints/activity/ShowOnMapActivity;->mMapView:Lcom/google/android/maps/MapView;
    invoke-static {v4}, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->access$600(Lcom/htc/android/footprints/activity/ShowOnMapActivity;)Lcom/google/android/maps/MapView;

    move-result-object v4

    invoke-virtual {v4}, Lcom/google/android/maps/MapView;->getMaxZoomLevel()I

    move-result v4

    if-ne v3, v4, :cond_3

    .line 402
    array-length v3, p1

    new-array v2, v3, [Ljava/lang/String;

    .line 403
    .local v2, nameList:[Ljava/lang/String;
    const/4 v0, 0x0

    .local v0, i:I
    :goto_1
    array-length v3, p1

    if-ge v0, v3, :cond_2

    .line 404
    aget-object v3, p1, v0

    iget-object v3, v3, Lcom/htc/android/footprints/vo/Footprint;->mName:Ljava/lang/String;

    aput-object v3, v2, v0

    .line 403
    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    .line 406
    :cond_2
    new-instance v3, Lcom/htc/widget/HtcAlertDialog$Builder;

    iget-object v4, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    invoke-direct {v3, v4}, Lcom/htc/widget/HtcAlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v4, 0x7f0a00ae

    invoke-virtual {v3, v4}, Lcom/htc/widget/HtcAlertDialog$Builder;->setTitle(I)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v3

    new-instance v4, Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay$1;

    invoke-direct {v4, p0, p1}, Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay$1;-><init>(Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;[Lcom/htc/android/footprints/vo/Footprint;)V

    invoke-virtual {v3, v2, v4}, Lcom/htc/widget/HtcAlertDialog$Builder;->setItems([Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v3

    invoke-virtual {v3}, Lcom/htc/widget/HtcAlertDialog$Builder;->show()Lcom/htc/widget/HtcAlertDialog;

    goto :goto_0

    .line 436
    .end local v0           #i:I
    .end local v2           #nameList:[Ljava/lang/String;
    :cond_3
    iget-object v3, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    const/4 v4, 0x0

    #calls: Lcom/htc/android/footprints/activity/ShowOnMapActivity;->zoomToFitItems([Lcom/htc/android/footprints/vo/Footprint;Ljava/lang/Runnable;)I
    invoke-static {v3, p1, v4}, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->access$700(Lcom/htc/android/footprints/activity/ShowOnMapActivity;[Lcom/htc/android/footprints/vo/Footprint;Ljava/lang/Runnable;)I

    move-result v3

    invoke-static {v3}, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->access$502(I)I

    goto :goto_0
.end method

.method public populateData()V
    .locals 0

    .prologue
    .line 382
    invoke-super {p0}, Lcom/htc/android/footprints/overlay/AbstractGroupableOverlay;->populate()V

    .line 383
    return-void
.end method

.method public size()I
    .locals 1

    .prologue
    .line 378
    iget-object v0, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    iget-object v0, v0, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->mDataList:Ljava/util/ArrayList;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/activity/ShowOnMapActivity$DrawFootprintOverlay;->this$0:Lcom/htc/android/footprints/activity/ShowOnMapActivity;

    iget-object v0, v0, Lcom/htc/android/footprints/activity/ShowOnMapActivity;->mDataList:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    goto :goto_0
.end method
